<?php
    $self_data=$_SERVER['PHP_SELF'];
    $file_name=basename($self_data);
    $controller_name_dat=explode('/',$self_data);
    $controller_name_dat=array_reverse($controller_name_dat);
    $controller_name=$controller_name_dat[1];
    if($controller_name=='Home'){
        if(!@$_SESSION['username']){
            echo "<script>alert('您还没有登录，请先登录');location.href='/study/style/check_url.php?url=".Home."/login.php'</script>";
            exit;
        }
    }else if($controller_name=='admin'){
        if(!@$_SESSION['number']){
            echo "<script>alert('您还没有登录，请先登录');location.href='/study/style/check_url.php?url=".admin."/login.php'</script>";
            exit;
        }
    }else{
       
    }
?>